﻿using System;

namespace EvincePayroll.Utility
{
    public class Log4NetWrapper : ILogger
    {
        private readonly log4net.ILog _logger;

        public Log4NetWrapper(Type type)
        {
            _logger = log4net.LogManager.GetLogger(type);
            log4net.Config.XmlConfigurator.Configure();
        }



        public void Log(string message)
        {
            _logger.Error(message);
        }

        public void Log(Exception ex)
        {
            _logger.Error(ex);
        }

        public void Log(string message, Exception ex)
        {
            _logger.Error(message, ex);
        }

        public void LogInfo(string message)
        {
            _logger.Info(message);
        }
    }
}
